<!DOCTYPE html>
<html>
<head>
  <title></title>
  <script src="../resources/jquery.js"></script>
  <script src="js/util.js"></script>
  <link rel="stylesheet" href="css/common.css">
  <link rel="stylesheet" href="css/menu.css">
  <link rel="stylesheet" href="css/catalogMenu.css">
  <link rel="stylesheet" href="css/catalog.css">
</head>
<body>
<?php
include_once("loginCheck.php");
?>
<div class="catalog">
  <div class="loadPage" id="loading">
    <img src="../img/loader_2_fast.gif">
  </div>
  <div id="modalDialogDiv">
    <div id="modalDialog">
      <div id="messagePlace">
      </div>
      <div id="buttonDiv">
        <div class="buttonTd">
          <input type="button" value="Отмена" onclick="$('#modalDialogDiv').hide()">
        </div>
        <div class="buttonTd">
          <input type="button" value="Продолжить" id="confirmButton">
        </div>
      </div>
    </div>
  </div>
  <?php
  /**
   * Created by PhpStorm.
   * User: Aliaksei Lazerka
   * Date: 10/22/14
   * Time: 5:59 PM
   */
  include_once("elems/menu.php");
  include_once("functions/db_manipulate.php");
  include_once("CatalogMenu.php");
  include_once("elems/catalogMenu.php");
  ?>
  <script>
    $('#directoryDiv').html('<?= CatalogMenu::getPath($_GET['act'])?>');
  </script>
  <div class="menuAndContent">
    <div class="catalogContent">
      <?php
      switch ($_GET['act']) {
        case "addRoot":
          include_once('addListRoot.php');
          break;
        case "addSub":
          include_once('addListSub.php');
          break;
        case "addProduct":
          include_once('addProduct.php');
          break;
        case "addField":
          include_once('addField.php');
          break;
        case "editRoot":
          include_once('editListRoot.php');
          break;
        case "editSub":
          include_once('editListSub.php');
          break;
        case "editProduct":
          include_once('editProduction.php');
          break;
        default:
          echo "<div style='width: 100%; height: 80%;'>
                  <div style='display: block; font-size:xx-large; text-align: center; height:50%;
                             padding-top: 10vh;'>
                  <img src='../img/location_pointer.png' style='height: 25px; padding-bottom: 5px'><br>
                  <div style='margin-top: 5px'>Выберите элемент из списка</div>
                  </div>
              </div>";
          break;
      }
      ?>
    </div>
  </div>
</div>
</body>
</html>